
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@commitlint/read
Advanced tools
@commitlint/read is an npm package that provides functionality to read and parse commit messages. It is typically used in conjunction with commitlint to enforce commit message conventions.
Read commit messages from a file
This feature allows you to read commit messages from a specified range of commits. In this example, it reads the commit message from the last commit.
const read = require('@commitlint/read');
read({from: 'HEAD~1', to: 'HEAD'}).then((messages) => {
console.log(messages);
});
Read commit messages from stdin
This feature allows you to read commit messages from the standard input. This is useful for integrating with other tools that provide commit messages via stdin.
const read = require('@commitlint/read');
process.stdin.on('data', (data) => {
read({edit: true}).then((messages) => {
console.log(messages);
});
});
conventional-changelog is a package that reads commit messages and generates changelogs based on conventional commit messages. It provides more extensive functionality for generating changelogs and release notes compared to @commitlint/read.
git-raw-commits is a package that reads raw commit messages from a git repository. It is similar to @commitlint/read in that it focuses on reading commit messages, but it provides more low-level access to the raw commit data.
Read commit messages from a specified range or last edit
npm install --save @commitlint/read
const read = require('@commitlint/read').default;
// Read last edited commit message
read({edit: true}).then((messages) => console.log(messages));
// => ['I did something\n\n']
// Read from the third to second commit message from HEAD
read({from: 'HEAD~2', to: 'HEAD~1'}).then((messages) => console.log(messages));
// => ['Initial commit\n\n']
Consult docs/api for comprehensive documentation.
FAQs
Read commit messages from a specified range or last edit
The npm package @commitlint/read receives a total of 2,254,677 weekly downloads. As such, @commitlint/read popularity was classified as popular.
We found that @commitlint/read demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.